package com.github.andy0106.kersstjtl.api;

import com.github.andy0106.kersstjtl.files.Dir;

import java.nio.file.Path;

public class Mod {
    private String name;
    private String mod_version;
    private String game_version;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMod_version() {
        return mod_version;
    }

    public void setMod_version(String mod_version) {
        this.mod_version = mod_version;
    }

    public String getGame_version() {
        return game_version;
    }

    public void setGame_version(String game_version) {
        this.game_version = game_version;
    }

    public String getFilename() {
        return name + "-" + mod_version + "-" + game_version + ".jar";
    }

    public boolean download(String mods_dir) {
        return ApiBuffer.download_mod(this, mods_dir);
    }

    public boolean download(Path mods_dir) {
        return download(mods_dir.toString());
    }

    public boolean download(Dir mods_dir) {
        return download(mods_dir.getPaths().toString());
    }
}
